Playful, streamlike computation

نویسنده

  • Pierre-Louis Curien
چکیده

We offer a short tour into the interactive interpretation of sequential programs. We emphasize streamlike computation – that is, computation of successive bits of information upon request. The core of the approach surveyed here dates back to the work of Berry and the author on sequential algorithms on concrete data structures in the late seventies, culminating in the design of the programming language CDS, in which the semantics of programs of any type can be explored interactively. Around one decade later, two major insights of Cartwright and Felleisen on one hand, and of Lamarche on the other hand gave new, decisive impulses to the study of sequentiality. Cartwright and Felleisen observed that sequential algorithms give a direct semantics to control operators like call-cc and proposed to include explicit errors both in the syntax and in the semantics of the language PCF. Lamarche (unpublished) connected sequential algorithms to linear logic and games. The successful program of games semantics has spanned over the nineties until now, starting with syntax-independent characterizations of the term model of PCF by Abramsky, Jagadeesan, and Malacaria on one hand, and by Hyland and Ong on the other hand. Only a basic acquaintance with λ-calculus, domains and linear logic is assumed in sections 1 through 3. 1 Prologue: playing with Böhm trees We first make some preparations. For self-containedness, we briefly recall the relevant notions. The syntax of the untyped λ-calculus (λ-calculus for short) is given by the following three constructions: a variable x is a λ-term, if M and N are λ-terms, then the application MN is a λ-term, and if M is a term then the abstraction λx.M is a term. Usual abbreviations are λx1x2.M for λx1.(λx2.M), and MN1N2 for (MN1)N2, and similarly for nary abstraction and application. A more macroscopic view is quite useful: it 1 is easy to check that any λ-term has exactly one of the following two forms: (n ≥ 1, p ≥ 1) λx1 · · · xn.xM1 · · ·Mp (n ≥ 0, p ≥ 1) λx1 · · · xn.(λx.M)M1 · · ·Mp . The first form is called a head normal form (hnf), while the second exhibits the head redex (λx.M)M1. The following easy property justifies the name of head normal form: any reduction sequence starting from a hnf λx1 · · · xn.xM1 · · ·Mp consists of an interleaving of independent reductions of M1, . . . ,Mp. More precisely, we have: (λx1 · · · xn.xM1 · · ·Mp → ∗ P )⇒ ∃N1, . . . Np { P = λx1 · · · xn.xN1 · · ·Np and ∀ i ≤ p Mi → ∗ Ni . Here, reduction means the replacement in any term of a sub-expression of the form (λx.M)N , called a β-redex, by M [x ← N ]. A normal form is a term that contains no β-redex, or equivalently that contains no head redex. Hence the syntax of normal forms is given by the following two constructions: a variable x is a normal form, and if M1, . . . ,Mp are normal forms, then λx1 · · · xn.xM1 · · ·Mp is a normal form. Now, we are ready to play. Consider the following two normal forms: M = zM1M2(λz1z2.z1M3M4) N = λx1x2x3.x3(λy1y2.y1N1)N2 . The term M [z ← N ] = NM1M2(λz1z2.z1M3M4) is not a normal form anymore, and can be β-reduced as follows: NM1M2(λz1z2.z1M3M4) → (λz1z2.z1M3M4)(λy1y2.y1N ′ 1)N ′ 2 → (λy1y2.y1N ′ 1)M ′ 3M ′ 4 → M ′ 3N ′′ 1 , where N ′ 1 , etc... are suitable substitution instances of N1 etc... But there is a more geometric way of describing the interaction of M and N . First, we represent M and N explicitly as trees (read from left to right), as follows:

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Playful Probing: Making Probing More Fun

We present a methodological variation of cultural probing called playful probing. In playful probing games are developed according to the area investigated, to enhance participants’ involvement in the studies. The games are used as additional probing material and enhance participants’ involvement. Based on an experimental case study with 40 households participating in a ethnographic study on ne...

متن کامل

Towards a Playful Organization Ideal-type: Values of a Playful Organizational Culture

Numerous organizations have embarked on playful endeavors such as serious gaming (playing games with a learning/training purpose) and ‘gamification’ (applying game technology and principles to make existing practices more game-like). One could consequently theorize about the dawn of playful organizations, i.e. a type of organization that is culturally and structurally playful. This article offe...

متن کامل

Gender Differences in Playful Aggression During Courtship in College Students

The current study explored gender differences in college students’ definitions and enjoyment of playful force and aggression. Ninety-six female and 55 male college students who were predominantly White (96%) and heterosexual (97%) answered questions about playful force during sex and playful aggression at other times. A content analysis showed that the current definitions were very similar to t...

متن کامل

A Playful Context Enhances Bilingual and Monolingual Preschoolers’ Mastery Motivation and Private Speech

A Playful Context Enhances Bilingual and Monolingual Preschoolers’ Mastery Motivation and Private Speech by Jeremy Sawyer Advisor: Anna Stetsenko Children’s private speech (audible self-talk during activity) has been studied primarily as a cognitive tool for thinking, planning and self-regulation. This study investigated whether private speech may also function as a tool for motivation. Vygotsk...

متن کامل

Playful Learning and Montessori Education

Although Montessori education is often considered a form of playful learning, Maria Montessori herself spoke negatively about a major component of playful learning—pretend play, or fantasy—for young children. In this essay, the author discusses this apparent contradiction: how and why Montessori education includes elements of playful learning while simultaneously eschewing fantasy. She conclude...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • CoRR

دوره abs/cs/0501033  شماره 

صفحات  -

تاریخ انتشار 2002